module DrunkenMaster
  # View is kind of widget that only has index action and
  # doesnt respond to any other actions. 
  # This means that index is implicitly called and it doesn't
  # need to appear in url then.
  class View < Widget

    # Override the widget's handle_url.
    # We call the index action and say that we didn't use
    # any part of the url to do it, so the other parts
    # of url may be handled by our children.
    def handle_url ch
      call_action :index
      0
    end

    # If anybody asks, we didn't recognize any chunks.
    def recognized_chunks
      nil
    end
  end
end